package com.txts.road.app.system.controller;

import com.txts.road.app.system.service.AgreementService;
import com.txts.base.common.domain.ResponseDTO;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;


/**
 * 协议存储前端控制层
 *
 * @author baoyr
 * @since 2025-07-17 10:46
 */
@Tag(name = "协议存储接口")
@RestController
@RequestMapping("/api/v1/agreement")
@RequiredArgsConstructor
public class AgreementController {

    private final AgreementService agreementService;

    /**
     * 获取服务协议
     */
    @Operation(summary = "获取服务协议")
    @GetMapping("/agreement/service")
    public ResponseDTO<String> getServiceAgreement() {
        return ResponseDTO.ok(agreementService.getServiceAgreement());
    }

    /**
     * 获取隐私协议
     */
    @Operation(summary = "获取隐私协议")
    @GetMapping("/agreement/privacy")
    public ResponseDTO<String> getPrivacyAgreement() {
        return ResponseDTO.ok(agreementService.getPrivacyAgreement());

    }
}
